@extends('admin.layout.index')
@section('content')
<div class="mws-panel grid_8">

@if (count($errors) > 0)
    <div class="mws-form-message error">
        错误提醒
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<div class="mws-panel-header">
        <span>网站配置</span>
    </div>
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/webconfig/update" method="post" enctype="multipart/form-data">
        {{ csrf_field()}}
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">网站名称</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="name" value="{{$data['name']}}">
                    </div>
                </div>
                
                   
                <div class="mws-form-row">
                    <label class="mws-form-label">网站关键字</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="keywords" value="{{$data['keywords']}}"> 
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">网站版权</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="copy" value="{{$data['copy']}}"> 
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">网站开关</label>
                    <div class="mws-form-item clearfix">
                        <ul class="mws-form-list inline">
                            <li><input type="radio" name="status" value="1" @if($data['status'] == '1') checked @endif checked> <label>开</label></li>
                            <li><input type="radio" name="status" value="2" @if($data['status'] == '2') checked @endif> <label>关</label></li>
                        </ul>
                    </div>
                </div>

                  </div>
                    <div class="mws-form-row" style="width:660px;display:inline-block">
                    <label class="mws-form-label">网站logo</label>
                    <img src="/upload/web/{{$data['logo']}}" width="100px">
                    <div class="mws-form-item" >
                        <input type="file" name="logo" value="">
                    </div>
                </div>
            </div>

            <div class="mws-button-row">
                <input value="添加" class="btn btn-danger" type="submit">
                <input value="重置" class="btn " type="reset">
            </div>
        </form>
    </div>      
</div>
@endsection